const app = getApp()
var template = require('../../template/template.js');
Page({

    /**
     * 页面的初始数据
     */
    /*data: {
      menuList:'',
      result:'',
    },*/

    /**
     * 生命周期函数--监听页面加载
     */
  onLoad: function (options) {
    var id = options.id
    console.log(id);
    var tabnum = app.globalData.tabnum
    template.tabbar("tabBar", 3, this, tabnum)//0表示第一个tabbar
   
     this.getItemsarray();
 
    
    
    
    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {

    },
    onReady: function (options) {
      //初始化数据
      
      //this.getItemsarray();
     
    },
    //获取所有数据
    getItemsarray: function () {
      var that = this;
     wx.request({
      
       url: 'https://xcx.chenjiudenanren.com/inter/sy/sao1',
       header: {
          "Content-Type": "applciation/json"
        },
        success: function (res) {
          console.log(res.data)
          that.setData({
            list: res.data.list,
            background: res.data.img,  
            video: res.data.video,          
          })
        },
        fail: function (err) {
          console.log(err)
        },
      })

    },
/*
    getzcfg: function () {
      var that = this;
      wx.request({

        url: 'https://xcx.chenjiudenanren.com/inter/sy1/gzdt',
        header: {
          "Content-Type": "applciation/json"
        },
        success: function (res) {
          console.log(res.data)
          that.setData({
            list: res.data.list,
            background: res.data.img,
            video: res.data.video,
          })
        },
        fail: function (err) {
          console.log(err)
        },
      })

    },*/
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {

    }
})